package com.heo.music.player.converter;

import com.heo.music.player.dto.output.PlaylistOutput;
import com.heo.music.player.entity.Playlist;
import org.modelmapper.ModelMapper;
import org.springframework.stereotype.Component;

/**
 * created on 2024-05-12 11:14
 *
 * @author 星天无极
 **/
@Component
public class PlaylistConverter extends AbstractConverter<Playlist, PlaylistOutput> {

    public PlaylistConverter(ModelMapper modelMapper) {
        super(modelMapper);
    }

    @Override
    public PlaylistOutput convert(Playlist playlist) {
        return modelMapper.map(playlist, PlaylistOutput.class);
    }
}
